import java.util.*;

class Main {

        public static void main(String[] args) {
            List<Person> list = List.of(
                new Person("Xiao", "Ming", 18),
                new Person("Xiao", "Hong", 25),
                new Person("Bob", "Smith", 20)
            );
            boolean exist = list.contains(new Person("Bob", "Smith", 20));
            System.out.println(exist ? "testing ok!" : "falling!");
        }
    }
    
    class Person {
        String firstName;
        String lastName;
        int age;
        public Person(String firstName, String lastName, int age) {
            this.firstName = firstName;
            this.lastName = lastName;
            this.age = age;
        }
    
       public boolean equals(Object o){
         if(o instanceof Person){
              Person p = (Person) o;
             return Objects.equals(p.firstName,this.firstName) && Objects.equals(p.lastName,this.lastName) && this.age == p.age;
          }
         return false;
    
       }   
    
    }
    